Skip to content

Continue IntersectionObserver batches after stale entries - #58235

Open
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:codex/fix-intersection-observer-stale-batch
Open

Continue IntersectionObserver batches after stale entries#58235
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:codex/fix-intersection-observer-stale-batch

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary:

IntersectionObserverManager intentionally tolerates stale native entries after an observer disconnects, but currently returns from the complete notification pass and drops callbacks for every later active observer in that batch. Skip only the stale observer, matching the equivalent ResizeObserver path, and add a deterministic queued-record regression.

Fixes #58234.

Changelog:

[GENERAL] [FIXED] - Continue dispatching active IntersectionObserver callbacks after a stale observer entry.

Test Plan:

  • Exact upstream focused Fantom run: 110 existing tests passed and the new stale-batch regression failed.
  • Fixed focused Fantom run: 111/111 passed across two suites.
  • The regression unregisters the first observer at the manager boundary to preserve its already queued native record; public disconnect() synchronously removes Fantom records and cannot represent the real commit-to-mount race.
  • Fresh Flow check: 0 errors.
  • Targeted no-ignore ESLint, Prettier, and git diff --check passed.

No UI change; screenshots are not applicable.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 30, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale IntersectionObserver entries abort callbacks for active observers

1 participant